<?php $this->beginContent('/layouts/main'); ?>
<div class="container">
    <div id="sidebar">
        <?php
        $shop_category_menus = array();
        $shop_category = ShopCategory::model()->findAll();
        if($shop_category != null){
            foreach($shop_category as $category){
                $shop_category_menus[] = array('label'=>''.$category->name, 'url'=>array('/shop/index','category'=>$category->id),'active'=>  isset ($_GET['category'])&&$_GET['category']==$category->id?true:false);
            }
        }
        if($this->id == 'shop'){
        echo '<div class="slide_menu">';
        if (isset($_GET['artist'])) {
            $artist_id = (int)$_GET['artist'];
            $artist = Artist::model()->findByPk($artist_id);
            echo '<h2 class="red20">Items by '.$artist->name.'</h2>';
        }
        $this->widget('zii.widgets.CMenu',array(
			'items'=>$shop_category_menus,
            'encodeLabel'=>false,
		));
        echo '</div>';
        }
        if($this->id == 'artist'&&$this->action->id!='event'&&$this->artistCategory!=6){
        echo '<div class="slide_menu">';
        $artist_category_menus = array();
        $artist_category_menus[] = array('label'=>'Illustration', 'url'=>array('/artist/illustration'),'active'=>($this->id=='artist'&&$this->action->id=='illustration')||(isset($this->artistCategory)&&$this->artistCategory==3)?true:false);
        $artist_category_menus[] = array('label'=>'Design', 'url'=>array('/artist/design'),'active'=>($this->id=='artist'&&$this->action->id=='design')||(isset($this->artistCategory)&&$this->artistCategory==5)?true:false);
        $artist_category_menus[] = array('label'=>'Animation', 'url'=>array('/artist/animation'),'active'=>($this->id=='artist'&&$this->action->id=='animation')||(isset($this->artistCategory)&&$this->artistCategory==1)?true:false);
        $this->widget('zii.widgets.CMenu',array(
			'items'=>$artist_category_menus,
            'encodeLabel'=>false,
		));
        echo '</div>';
        }
        if($this->id == 'blog'){
        echo '<div class="slide_menu">';
        $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'Facebook', 'url'=>Yii::app()->params['facebook']),
                                array('label'=>'Twitter', 'url'=>Yii::app()->params['twitter']),
			),
            'encodeLabel'=>false,
		));
        echo '</div>';
        }
        ?>
    </div>
    <div id="content">
        <?php echo $content; ?>
    </div><!-- content -->
    <div class="clear"></div>
</div>
<?php $this->endContent(); ?>